package com.gjy.mongo.sp;

import lombok.Getter;
import lombok.Setter;
import org.springframework.data.annotation.CreatedBy;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedBy;
import org.springframework.data.annotation.LastModifiedDate;

import java.util.Date;

/**
 * 审计
 * 业务实体类继承该审计类
 * 主启动类加上 @EnableMongoAuditing
 *
 * @author 宫静雨
 * @version 1.0
 * @since 2023-01-30 10:53:23
 */
@Setter
@Getter
public class BaseAuditable {

    @CreatedDate
    private Date createDate;

    @LastModifiedDate
    private Date updateDate;

    @CreatedBy
    private String createBy;

    @LastModifiedBy
    private String updateBy;
}
